const { loadEnv } = require('vite')
const plugin = require('tailwindcss/plugin')
const { readdirSync, readFileSync } = require('fs')
const fs = require('fs')
const env = loadEnv(process.env.NODE_ENV, process.cwd(), '')


/** @type {import('tailwindcss').Config} */
module.exports = {
    content: [
        "./index.html",
        "./src/**/*.{js,ts,jsx,tsx,vue}",
    ],
    corePlugins: {
        // due to https://github.com/tailwindlabs/tailwindcss/issues/6602 - buttons disappear
        preflight: false
    },
    theme: {
        extend: {
            colors: {
            }
        }
    },
    plugins: [plugin(function ({ addComponents }) {
        const components = {
            '.common-page': {
                width: '100%',
                height: '100%',
                background: '#fff',
                padding: '0px',
                display: 'flex',
                'flex-direction': 'column',
                overflow: 'auto'
            }
            // ...
        }

        addComponents(components)
    })],
}
